﻿<UserControl x:Class="Schedulr.Plugins.SaveCopy.SaveCopyPluginSettingsControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>

        <Label Grid.Row="0" Grid.Column="0" Content="Destination folder" VerticalAlignment="Center" Margin="0,0,5,0" />
        <Grid Grid.Row="0" Grid.Column="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>

            <TextBox Grid.Column="0" Text="{Binding Path=DestinationFolder, Mode=TwoWay}" />
            <Button Grid.Column="1" Content="..." x:Name="browseDestinationFolderButton" Click="browseDestinationFolderButton_Click" Margin="5,0,0,0" Style="{DynamicResource MediumButton}" />
        </Grid>

        <Label Grid.Row="1" Grid.Column="0" Content="Run on" Margin="0,5,5,0" VerticalAlignment="Center" />
        <WrapPanel Grid.Row="1" Grid.Column="1" Margin="0,5,0,0">
            <CheckBox IsChecked="{Binding Path=RunOnPictures}">
                <Label Content="Pictures" />
            </CheckBox>
            <CheckBox IsChecked="{Binding Path=RunOnVideos}" Margin="5,0,0,0">
                <Label Content="Videos" />
            </CheckBox>
        </WrapPanel>

        <Label Grid.Row="2" Grid.Column="0" Content="File extensions" Margin="0,5,5,0" VerticalAlignment="Center" />
        <StackPanel Grid.Row="2" Grid.Column="1" Margin="0,5,0,0" Orientation="Horizontal">
            <TextBox Text="{Binding Path=PictureFileExtension}" MinWidth="40" Margin="0,0,5,0" />
            <Label Content="for pictures" VerticalAlignment="Center" />
        </StackPanel>

        <StackPanel Grid.Row="3" Grid.Column="1" Margin="0,5,0,0" Orientation="Horizontal">
            <TextBox Text="{Binding Path=VideoFileExtension}" MinWidth="40" Margin="0,0,5,0" />
            <Label Content="for videos" VerticalAlignment="Center" />
        </StackPanel>

        <TextBlock Grid.Row="4" Grid.Column="1" Margin="0,5,0,0" Foreground="{DynamicResource UserMessageFontBrush}" TextWrapping="Wrap" Text="If any previous manipulations change the file type (e.g. most of them output pictures as JPEG), you can set the output file extension here (if not, you can leave them empty to use the original file extension)." />
    </Grid>
</UserControl>